<div class="module-notice module-notice-list">
    <ol class="breadcrumb">
        <li>锁仓计划</li>
        <li>锁仓记录</li>
    </ol>

    <div class="panel panel-warning">
        <div class="panel-body">
            <a href="#/lock/stat" class="btn btn-warning" style="float: right;">统计</a>
            <form class="form-inline ui-form" role="form">
                <div class="form-group ui-input-select">
                    <input type="text" class="form-control " placeholder="UID"
                           ng-model="vm.condition.uid" >
                </div>
                <div class="form-group">
                    <select class="form-control" ng-model="vm.condition.assetCode">
                        <option value="">全部</option>
                        <option ng-repeat="item in $root.$coinList" ng-value="item.value">{{item.label}}</option>
                    </select>
                    <button type="submit"  class="btn btn-primary" ng-click="vm.fetchList()">搜索</button>
                </div>
            </form>
        </div>
    </div>

    <div class="ui-box">
        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <th width="10%">资产</th>
                <th width="10%">UID</th>
                <th width="10%">类型</th>
                <th width="20%">数量</th>
                <th width="30%">时间</th>
                <th width="20%">当前锁仓量</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
                <td>{{item.assetCode}}</td>
                <td>{{item.uid}}</td>
                <td>
                    <span class="text" ng-if="item.status === 'LOCK'">锁仓</span>
                    <span class="text" ng-if="item.status === 'UNLOCK'">解仓</span>
                </td>
                <td>{{item.lockAmount}}</td>
                <td>{{$root.moment(item.createDate).utc().utcOffset($root.ZONE).format('YYYY-MM-DD HH:mm:ss')}}</td>
                <td>
                    {{item.totalLockAmount}}
                </td>
            </tr>
            <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
                <td colspan="6">暂无数据</td>
            </tr>
            <tr class="ui-loading" ng-if="vm.isLoading === true">
                <td colspan="6">正在加载，请稍候...</td>
            </tr>
            </tbody>
        </table>

        <div class="ui-pager-box" v-if="vm.totalNum > 0">
            <ul uib-pagination
                previous-text="上一页"
                next-text="下一页"
                first-text="首页"
                last-text="尾页"
                total-items="vm.totalNum"
                ng-model="vm.condition.pageNo"
                max-size="5"
                items-per-page="vm.condition.pageSize || 30"
                align="right"
                class="pagination"
                boundary-links="true"
                ng-change="vm.pageChanged()"
                rotate="false"></ul>
        </div>
    </div>


</div>
